import { Component } from "react";
class event extends Component {
  constructor(props) {
    super(props);
    this.state = {};
    this.bnt = this.bntt.bind(this);
  }
  bntt(e) {
    console.log("bnt",e,'bnt');
  }
  bnt1(e) {
    console.log("bnt1",e,'bnt1');
  }
  bnt2 = (e) => {
    console.log("bnt2");
  };
  bint4(){
      console.log('bnt4')
  }
  render() {
    return (
      <div>
        <h5>我是事件模块</h5>
        <li>
          <button onClick={this.bnt}>bnt </button>
        </li>
        <li>
          <button onClick={this.bnt1.bind(this,'bnt')}>bnt1 </button>
        </li>
        <li>
          <button onClick={this.bnt2}>bnt2 </button>
        </li>
        <li>
          <button onClick={()=>{
              console.log('bnt3')
          }}>bnt3 </button>
        </li>
        <li>
          <button onClick={()=>this.bint4()}>bnt4 </button>
        </li>
      </div>
    );
  }
}

export default event;
